﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.CQ.RCYY
{
    /// <summary>
    /// MaZuiTongYiShuCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class MaZuiTongYiShuCtrl : CustomCommonTableCtrl
    {
        public MaZuiTongYiShuCtrl()
        {
            InitializeComponent();
            IniteRadioBation();
        }

        private void CustomRadioButtonCtrl_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void CustomTextCtrl_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void CustomTextCtrl_GotFocus(object sender, RoutedEventArgs e)
        {
            CustomTextCtrl cText = sender as CustomTextCtrl;
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {

                cText.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMD);//xxxx年xx月xx日
            }
        }

        private void CustomTextCtrl_GotFocus_1(object sender, RoutedEventArgs e)
        {
            CustomTextCtrl cText = sender as CustomTextCtrl;
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {

                cText.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_HM);//xxxx年xx月xx日
            }

        }
        private void IniteRadioBation()
        {
            new RadioButtonHelper().ChangeRadioSatus(ty,bty,bqzt);
        }
        }
}
